package com.shark.springbootcms.mapper;

import com.shark.springbootcms.form.UserForm;
import com.shark.springbootcms.model.Role;
import com.shark.springbootcms.vo.RolesVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoleMapper {
    void addRole(Role form);

    List<Role> roleList(UserForm form);

    void editRole(Role role);

    void deleteRoleById(String id);

    List<String> selectRoleMenu(String roleId);

    void deleteRoleMenuById(String roleId);

    void insertRoleMenu(@Param("roleId") String roleId, @Param("list") List<String> ids);

    List<RolesVo> selectRoles();

    void deleteRoleMenu(String id);

    void deleteUserRole(String id);
}
